﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nancy.Model.DataModel
{
   public class BaseEntity
    {
        [Key]
        // 参考说明：https://docs.microsoft.com/zh-cn/dotnet/api/system.componentmodel.dataannotations.schema.databasegeneratedoption?view=netframework-4.6&f1url=%3FappId%3DDev16IDEF1%26l%3DZH-CN%26k%3Dk(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity);k(SolutionItemsProject);k(TargetFrameworkMoniker-.NETFramework,Version%253Dv4.6);k(DevLang-csharp)%26rd%3Dtrue
        //   DatabaseGeneratedOption.Identity  自增属性可用于 int 和 guid
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]


        public Guid Id { get; set; }
    }
}
